package com.mywork.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mymvc.action.Action;
import com.mymvc.from.ActionForm;
import com.mywork.action.form.Test1Form;

public class Test1Action implements Action {

	public String execute(HttpServletRequest req, HttpServletResponse res,
			ActionForm form, Map<String, String> map) {
		
		Test1Form test = (Test1Form) form;
		
		System.out.println("name="+test.getName()+"   password="+test.getPassword());
		if("a".equals(test.getName())) {
			return map.get("a");
		}else {
			return map.get("b");
		}
		
	}

}
